package com.epfresh.bean;

import com.epfresh.global.CartHelper;
import com.epfresh.utils.FormatUtil;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by zhaozhenqiang on 2018/3/30.
 */

public class OfferGoodsGo {
    public boolean isToListOffer() {
        return toListOffer;
    }

    public void setToListOffer(boolean toListOffer) {
        this.toListOffer = toListOffer;
    }

    public boolean toListOffer;
    public boolean isAccountIsBindDc() {
        return accountIsBindDc;
    }

    public void setAccountIsBindDc(boolean accountIsBindDc) {
        this.accountIsBindDc = accountIsBindDc;
    }

    /**
     * content : [{"tags":[],"storeName":"小何特菜专卖","species":null,"modifiedTime":"2018-03-02 15:44:33","origin":"北京","moq":10,"pack":"10公斤/箱","type":1,"packageContainer":"箱","variety":"","packageSize":10,"id":2565,"title":"紫背","level":"一级","thumbnail":"http://imgtest.epfresh.com/2017%2F3%2F15%2F9bfd173a9a9c459e9d500f7e1d18f200.jpg-PRODUCTTHUMBNAIL","price":"0.01元/公斤","marketName":"北环","originalPrice":0.01,"inventory":860,"isAcceptOrders":1,"merchantId":37,"incr":10,"packageUnit":"公斤","storeId":32,"chargeUnit":"公斤","priceOnly":0.01},{"tags":[],"storeName":"小陈蔬菜经销部","species":"","modifiedTime":"2017-07-25 14:14:29","origin":"云南","moq":10,"pack":"10公斤/箱","type":1,"packageContainer":"箱","variety":"","packageSize":10,"id":2718,"title":"紫背","level":"一级","thumbnail":"http://imgtest.epfresh.com/2017%2F3%2F23%2Fd0e99aab59f94b598ea3e18091927aac.jpg-PRODUCTTHUMBNAIL","price":"12.0元/公斤","marketName":"北环","originalPrice":12,"inventory":590,"isAcceptOrders":1,"merchantId":78,"incr":10,"packageUnit":"公斤","storeId":73,"chargeUnit":"公斤","priceOnly":12},{"tags":[],"storeName":"菜通八方蔬菜配送","species":null,"modifiedTime":"2017-08-02 09:21:18","origin":"山东","moq":1,"pack":"1公斤/袋","type":1,"packageContainer":"袋","variety":"蒜苔","packageSize":1,"id":8370,"title":"山东蒜苔蒜薹","level":"","thumbnail":"http://imgtest.epfresh.com/2017%2F6%2F23%2F68a7214bb99d49999f6d95114671a983.jpg-PRODUCTTHUMBNAIL","price":"6.0元/公斤","marketName":"北环","originalPrice":6,"inventory":944,"isAcceptOrders":1,"merchantId":211,"incr":1,"packageUnit":"公斤","storeId":207,"chargeUnit":"公斤","priceOnly":6},{"tags":[],"storeName":"菜通八方蔬菜配送","species":null,"modifiedTime":"2017-07-21 15:31:03","origin":"本地","moq":1,"pack":"1公斤/袋","type":1,"packageContainer":"袋","variety":"青椒","packageSize":1,"id":8372,"title":"本地青椒辣椒(一级)","level":"一级","thumbnail":"http://imgtest.epfresh.com/2017%2F6%2F23%2Fa605708a419e4ab68194612c8832e91c.jpg-PRODUCTTHUMBNAIL","price":"4.0元/公斤","marketName":"北环","originalPrice":4,"inventory":939,"isAcceptOrders":1,"merchantId":211,"incr":1,"packageUnit":"公斤","storeId":207,"chargeUnit":"公斤","priceOnly":4},{"tags":[],"storeName":"菜通八方蔬菜配送","species":null,"modifiedTime":"2017-08-09 08:12:08","origin":"湖北","moq":1,"pack":"2.5公斤/袋","type":1,"packageContainer":"袋","variety":"带根金针菇","packageSize":2.5,"id":8373,"title":"湖北带根金针菇金针菇(如意情)(一级)","level":"一级","thumbnail":"http://imgtest.epfresh.com/2017%2F6%2F23%2Fd8e07faab01e40dfb0c43e116a7518f1.jpg-PRODUCTTHUMBNAIL","price":"20.0元/袋","marketName":"北环","originalPrice":20,"inventory":967,"isAcceptOrders":1,"merchantId":211,"incr":1,"packageUnit":"公斤","storeId":207,"chargeUnit":"袋","priceOnly":20},{"tags":[],"storeName":"银川民为鲜农产品流通有限公司","species":"","modifiedTime":"2017-09-21 09:52:59","origin":"","moq":1,"pack":"","type":1,"packageContainer":"散货","variety":"","packageSize":1,"id":10039,"title":"油麦菜","level":"","thumbnail":"http://imgtest.epfresh.com/FoBeupHDoT94WlKb0D3NWo2CmOCb-PRODUCTTHUMBNAIL","price":"2.88元/公斤","marketName":"北环","originalPrice":2.88,"inventory":99999,"isAcceptOrders":1,"merchantId":7,"incr":1,"packageUnit":"公斤","storeId":244,"chargeUnit":"公斤","priceOnly":2.88},{"tags":[],"storeName":"佳家鲜蔬菜配送","species":"小白菜","modifiedTime":"2018-03-15 15:46:42","origin":"宁夏","moq":3,"pack":"3公斤/袋","type":1,"packageContainer":"袋","variety":"小白菜","packageSize":3,"id":11001,"title":"宁夏小白菜(一级)","level":"一级","thumbnail":"http://imgtest.epfresh.com/2017%2F6%2F10%2F0ef1d8bee1ea4ffca1a11eb0447f8358.jpg-PRODUCTTHUMBNAIL","price":"0.01元/公斤","marketName":"北环","originalPrice":0.01,"inventory":122,"isAcceptOrders":1,"merchantId":169,"incr":3,"packageUnit":"公斤","storeId":165,"chargeUnit":"公斤","priceOnly":0.01},{"tags":[],"storeName":"佳家鲜蔬菜配送","species":null,"modifiedTime":"2018-03-13 16:38:42","origin":"宁夏","moq":2,"pack":"1公斤/袋","type":1,"packageContainer":"袋","variety":"香菜","packageSize":1,"id":11003,"title":"宁夏香菜(一级)","level":"一级","thumbnail":"http://imgtest.epfresh.com/2017%2F6%2F23%2F473c74577d274f069a60c719859c20b4.jpg-PRODUCTTHUMBNAIL","price":"0.01元/袋","marketName":"北环","originalPrice":0.01,"inventory":33,"isAcceptOrders":1,"merchantId":169,"incr":1,"packageUnit":"公斤","storeId":165,"chargeUnit":"袋","priceOnly":0.01},{"tags":[],"storeName":"小何特菜专卖","species":"菊花菜","modifiedTime":"2018-03-02 15:44:50","origin":"","moq":10,"pack":"10公斤/箱","type":1,"packageContainer":"箱","variety":"","packageSize":10,"id":11052,"title":"菊花菜","level":"一级","thumbnail":"http://imgtest.epfresh.com/2017%2F3%2F15%2F43a60f672bc6400683a298a29d966c07.jpg-PRODUCTTHUMBNAIL","price":"0.02元/公斤","marketName":"北环","originalPrice":0.02,"inventory":580,"isAcceptOrders":1,"merchantId":37,"incr":10,"packageUnit":"公斤","storeId":32,"chargeUnit":"公斤","priceOnly":0.02},{"tags":[],"storeName":"小何特菜专卖","species":"乳瓜花","modifiedTime":"2017-09-13 14:34:44","origin":"宁夏","moq":3,"pack":"3公斤/箱","type":1,"packageContainer":"箱","variety":"乳瓜花","packageSize":3,"id":11060,"title":"乳瓜花","level":"一级","thumbnail":"http://imgtest.epfresh.com/2017%2F3%2F23%2Fdd8c3b75b8e64b59a70c56894fb894b2.jpg-PRODUCTTHUMBNAIL","price":"40.0元/公斤","marketName":"北环","originalPrice":40,"inventory":58,"isAcceptOrders":1,"merchantId":37,"incr":3,"packageUnit":"公斤","storeId":32,"chargeUnit":"公斤","priceOnly":40}]
     * last : true
     * totalElements : 10
     * number : 0
     * responseTime : 2018-03-30 11:47:41
     * topCategory : [{"id":1,"name":"蔬菜","status":1,"for_purchaser":1,"for_supplier":1,"sort":1,"icon_id":13936,"creator_id":5,"created_time":"2016-09-30 10:00:05","modifier_id":56,"modified_time":"2017-04-18 19:37:03"},{"id":2,"name":"水果","status":1,"for_purchaser":1,"for_supplier":1,"sort":2,"icon_id":13937,"creator_id":5,"created_time":"2016-09-30 10:04:28","modifier_id":56,"modified_time":"2017-04-18 19:37:09"},{"id":10,"name":"日用百货","status":1,"for_purchaser":1,"for_supplier":1,"sort":10,"icon_id":13934,"creator_id":5,"created_time":"2016-09-30 17:40:51","modifier_id":56,"modified_time":"2017-04-18 19:36:52"}]
     * size : 10
     */

    private int shoppingCarCount;

    public int getShoppingCarCount() {
        return shoppingCarCount;
    }

    public void setShoppingCarCount(int shoppingCarCount) {
        this.shoppingCarCount = shoppingCarCount;
    }

    private boolean accountIsBindDc;
    private boolean last;
    private String totalElements;
    private int number;
    private String responseTime;
    private int size;
    private List<ContentBean> content;
    private List<TopCategoryBean> topCategory;


    public boolean isLast() {
        return last;
    }

    public void setLast(boolean last) {
        this.last = last;
    }

    public String getTotalElements() {
        return totalElements;
    }

    public void setTotalElements(String totalElements) {
        this.totalElements = totalElements;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public String getResponseTime() {
        return responseTime;
    }

    public void setResponseTime(String responseTime) {
        this.responseTime = responseTime;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public List<ContentBean> getContent() {
        return content;
    }

    public void setContent(List<ContentBean> content) {
        this.content = content;
    }

    public List<TopCategoryBean> getTopCategory() {
        return topCategory;
    }

    public void setTopCategory(List<TopCategoryBean> topCategory) {
        this.topCategory = topCategory;
    }

    public static class ContentBean implements CartHelper.CartHelperTools{
        /**
         * tags : []
         * storeName : 小何特菜专卖
         * species : null
         * modifiedTime : 2018-03-02 15:44:33
         * origin : 北京
         * moq : 10
         * pack : 10公斤/箱
         * type : 1
         * packageContainer : 箱
         * variety :
         * packageSize : 10
         * id : 2565
         * title : 紫背
         * level : 一级
         * thumbnail : http://imgtest.epfresh.com/2017%2F3%2F15%2F9bfd173a9a9c459e9d500f7e1d18f200.jpg-PRODUCTTHUMBNAIL
         * price : 0.01元/公斤
         * marketName : 北环
         * originalPrice : 0.01
         * inventory : 860
         * isAcceptOrders : 1
         * merchantId : 37
         * incr : 10
         * packageUnit : 公斤
         * storeId : 32
         * chargeUnit : 公斤
         * priceOnly : 0.01
         */

        Double shoppingCarProductCount;

        public Double getShoppingCarProductCount() {
            return shoppingCarProductCount;
        }

        public void setShoppingCarProductCount(Double shoppingCarProductCount) {
            this.shoppingCarProductCount = shoppingCarProductCount;
        }

        private ContentBean.OfferProductDtoBean offerProductDto;

        public ContentBean.OfferProductDtoBean getOfferProductDto() {
            return offerProductDto;
        }

        public void setOfferProductDto(ContentBean.OfferProductDtoBean offerProductDto) {
            this.offerProductDto = offerProductDto;
        }
        public static class OfferProductDtoBean {
            /**
             * offerProductId : 78
             * productId : 8250
             * promotiomItemId : null
             * productCount : 1
             * productUnitPrice : 10
             * offerStatus : 4
             * text : 14:13已报价
             */

            private String offerProductId;
            private String productId;
            private Object promotiomItemId;
            private Double productCount;
            private String productUnitPrice;
            private int offerStatus;
            private String text;

            public String getOfferProductId() {
                return offerProductId;
            }

            public void setOfferProductId(String offerProductId) {
                this.offerProductId = offerProductId;
            }

            public String getProductId() {
                return productId;
            }

            public void setProductId(String productId) {
                this.productId = productId;
            }

            public Object getPromotiomItemId() {
                return promotiomItemId;
            }

            public void setPromotiomItemId(Object promotiomItemId) {
                this.promotiomItemId = promotiomItemId;
            }

            public Double getProductCount() {
                return productCount;
            }

            public void setProductCount(Double productCount) {
                this.productCount = productCount;
            }

            public String getProductUnitPrice() {
                if(productUnitPrice==null||"".equals(productUnitPrice))
                    return "¥--/公斤";
                else
                    return "¥"+productUnitPrice+"/公斤";
            }

            public void setProductUnitPrice(String productUnitPrice) {
                this.productUnitPrice = productUnitPrice;
            }

            public int getOfferStatus() {
                return offerStatus;
            }

            public void setOfferStatus(int offerStatus) {
                this.offerStatus = offerStatus;
            }

            public String getText() {
                return text;
            }

            public void setText(String text) {
                this.text = text;
            }
        }
        private String require;

        private boolean showOfferThree;

        public boolean isShowOfferThree() {
            return showOfferThree;
        }

        public void setShowOfferThree(boolean showOfferThree) {
            this.showOfferThree = showOfferThree;
        }

        public String getRequire() {
            return require;
        }

        public void setRequire(String require) {
            this.require = require;
        }

        private double count;
        private int isDisabled;

        public String getPromotionMarkUrl() {
            return promotionMarkUrl;
        }

        public void setPromotionMarkUrl(String promotionMarkUrl) {
            this.promotionMarkUrl = promotionMarkUrl;
        }

        public boolean isDisabled() {
            return isDisabled == 1 ? true : false;
        }

        public void setIsDisabled(int isDisabled) {
            this.isDisabled = isDisabled;
        }


        public int getIsDisabled() {
            return isDisabled;
        }

        public double getCount() {
            if(shoppingCarProductCount==null)
                return 0;
            else
                return shoppingCarProductCount;
        }

        public void setCount(double count) {
            this.count = count;
        }

        public String getPromotionItemType() {
            return promotionItemType;
        }

        public void setPromotionItemType(String promotionItemType) {
            this.promotionItemType = promotionItemType;
        }

        public String getPromotionItemStatus() {
            return promotionItemStatus;
        }

        public void setPromotionItemStatus(String promotionItemStatus) {
            this.promotionItemStatus = promotionItemStatus;
        }

        public String getGoodsCount() {
            String s = FormatUtil.subZeroAndDot(getCount() + "");
            if ("0".equals(s)) {
                return "";
            }
            return s;
        }

        @Override
        public String getUniqueKey() {
            return getIdPlus();
        }

        public String getIdPlus() {
            if (promotionItemId != null ){
                return id+"|"+promotionItemId;
            }
            return id;
        }
        private String shoppingCarId;

        public String getShoppingCarId() {
            return shoppingCarId;
        }

        public void setShoppingCarId(String shoppingCarId) {
            this.shoppingCarId = shoppingCarId;
        }

        private String promotionItemQuantityPerAccount;
        private String promotionItemEndTime;
        private String promotionItemId;
        private String promotionItemType;
        private String promotionItemStatus;
        private String promotionItemBeginTime;
        private String promotionMarkUrl;

        public String getPromotionItemId() {
            return promotionItemId;
        }

        public void setPromotionItemId(String promotionItemId) {
            this.promotionItemId = promotionItemId;
        }

        private String lastSnapshotId;
        public String getLastSnapshotId() {
            return lastSnapshotId;
        }

        public void setLastSnapshotId(String lastSnapshotId) {
            this.lastSnapshotId = lastSnapshotId;
        }

        private String storeName;
        private Object species;
        private String modifiedTime;
        private String origin;
        private Double moq;
        private String pack;
        private Double type;
        private String packageContainer;
        private String variety;
        private Double packageSize;
        private String id;
        private String title;
        private String level;
        private String thumbnail;
        private String price;
        private String marketName;
        private double originalPrice;
        private Double inventory;
        private int isAcceptOrders;
        private Double merchantId;
        private Double incr;
        private String packageUnit;
        private Double storeId;
        private String chargeUnit;
        private double priceOnly;
        private ArrayList<HomeCommTag> tags;

        public String getStoreName() {
            return storeName;
        }

        public void setStoreName(String storeName) {
            this.storeName = storeName;
        }

        public Object getSpecies() {
            return species;
        }

        public void setSpecies(Object species) {
            this.species = species;
        }

        public String getModifiedTime() {
            return modifiedTime;
        }

        public void setModifiedTime(String modifiedTime) {
            this.modifiedTime = modifiedTime;
        }

        public String getOrigin() {
            return origin;
        }

        public void setOrigin(String origin) {
            this.origin = origin;
        }

        public Double getMoq() {
            return moq;
        }

        public void setMoq(Double moq) {
            this.moq = moq;
        }

        public String getPack() {
            return pack;
        }

        public void setPack(String pack) {
            this.pack = pack;
        }

        public Double getType() {
            return type;
        }

        public void setType(Double type) {
            this.type = type;
        }

        public String getPackageContainer() {
            return packageContainer;
        }

        public void setPackageContainer(String packageContainer) {
            this.packageContainer = packageContainer;
        }

        public String getVariety() {
            return variety;
        }

        public void setVariety(String variety) {
            this.variety = variety;
        }

        public Double getPackageSize() {
            return packageSize;
        }

        public void setPackageSize(Double packageSize) {
            this.packageSize = packageSize;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getLevel() {
            return level;
        }

        public void setLevel(String level) {
            this.level = level;
        }

        public String getThumbnail() {
            return thumbnail;
        }

        public void setThumbnail(String thumbnail) {
            this.thumbnail = thumbnail;
        }

        public String getPrice() {
            return price;
        }

        public void setPrice(String price) {
            this.price = price;
        }

        public String getMarketName() {
            return marketName;
        }

        public void setMarketName(String marketName) {
            this.marketName = marketName;
        }

        public double getOriginalPrice() {
            return originalPrice;
        }

        public void setOriginalPrice(double originalPrice) {
            this.originalPrice = originalPrice;
        }

        public Double getInventory() {
            return inventory;
        }

        public void setInventory(Double inventory) {
            this.inventory = inventory;
        }

        public int getIsAcceptOrders() {
            return isAcceptOrders;
        }

        public boolean isAcceptOrders() {
            //1是接单
            return isAcceptOrders != 1 ? false : true;
        }


        public void setIsAcceptOrders(int isAcceptOrders) {
            this.isAcceptOrders = isAcceptOrders;
        }

        public Double getMerchantId() {
            return merchantId;
        }

        public void setMerchantId(Double merchantId) {
            this.merchantId = merchantId;
        }

        public Double getIncr() {
            return incr;
        }

        public void setIncr(Double incr) {
            this.incr = incr;
        }

        public String getPackageUnit() {
            return packageUnit;
        }

        public void setPackageUnit(String packageUnit) {
            this.packageUnit = packageUnit;
        }

        public Double getStoreId() {
            return storeId;
        }

        public void setStoreId(Double storeId) {
            this.storeId = storeId;
        }

        public String getChargeUnit() {
            return chargeUnit;
        }

        public void setChargeUnit(String chargeUnit) {
            this.chargeUnit = chargeUnit;
        }

        public double getPriceOnly() {
            return priceOnly;
        }

        public void setPriceOnly(double priceOnly) {
            this.priceOnly = priceOnly;
        }

        public ArrayList<HomeCommTag> getTags() {
            return tags;
        }

        public void setTags(ArrayList<HomeCommTag> tags) {
            this.tags = tags;
        }
    }

    public static class TopCategoryBean {
        /**
         * id : 1
         * name : 蔬菜
         * status : 1
         * for_purchaser : 1
         * for_supplier : 1
         * sort : 1
         * icon_id : 13936
         * creator_id : 5
         * created_time : 2016-09-30 10:00:05
         * modifier_id : 56
         * modified_time : 2017-04-18 19:37:03
         */

        int number;

        public int getNumber() {
            return number;
        }

        public void setNumber(int number) {
            this.number = number;
        }

        private String id;
        private String name;
        private Double status;
        private Double for_purchaser;
        private Double for_supplier;
        private Double sort;
        private Double icon_id;
        private Double creator_id;
        private String created_time;
        private Double modifier_id;
        private String modified_time;
        private boolean select;

        public boolean isSelect() {
            return select;
        }

        public void setSelect(boolean select) {
            this.select = select;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Double getStatus() {
            return status;
        }

        public void setStatus(Double status) {
            this.status = status;
        }

        public Double getFor_purchaser() {
            return for_purchaser;
        }

        public void setFor_purchaser(Double for_purchaser) {
            this.for_purchaser = for_purchaser;
        }

        public Double getFor_supplier() {
            return for_supplier;
        }

        public void setFor_supplier(Double for_supplier) {
            this.for_supplier = for_supplier;
        }

        public Double getSort() {
            return sort;
        }

        public void setSort(Double sort) {
            this.sort = sort;
        }

        public Double getIcon_id() {
            return icon_id;
        }

        public void setIcon_id(Double icon_id) {
            this.icon_id = icon_id;
        }

        public Double getCreator_id() {
            return creator_id;
        }

        public void setCreator_id(Double creator_id) {
            this.creator_id = creator_id;
        }

        public String getCreated_time() {
            return created_time;
        }

        public void setCreated_time(String created_time) {
            this.created_time = created_time;
        }

        public Double getModifier_id() {
            return modifier_id;
        }

        public void setModifier_id(Double modifier_id) {
            this.modifier_id = modifier_id;
        }

        public String getModified_time() {
            return modified_time;
        }

        public void setModified_time(String modified_time) {
            this.modified_time = modified_time;
        }
    }
}
